package com.fm.mapper;

import com.fm.entity.ProductFunction;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by Administrator on 2018/7/30 0030.
 */
public interface ProductFunctionMapper extends MBaseMapper<ProductFunction, Integer>{

    @Query(value = "select * from ul_product_function where type in (1,3) and product_id =?1 and parent_id = 0", nativeQuery = true)
    List<ProductFunction> selectParamAndMetodByProductId(Integer equipmentId);

    @Query(value = "select data_format from ul_product_function where identifier=?1 and product_id =?2", nativeQuery = true)
    Integer getTypeByNameAndProductId(String name, Integer productId);
}
